
#include <QWidget>

#include "Data.h"


Data::Data(QWidget *parent)
{
    m_labelId = new QLabel(tr("Id : "));
    m_lineId = new QLineEdit;

    m_labelType = new QLabel(tr("Type : "));
    m_comboType = new QComboBox;
    m_comboType->addItem("String");
    m_comboType->addItem("Integer");
    m_comboType->addItem("None");

    m_labelSize = new QLabel(tr("Size : "));
    m_spinSize = new QSpinBox;

    m_labelSigned = new QLabel(tr("Signed : "));
    m_comboSigned = new QComboBox;
    m_comboSigned->addItem("true");
    m_comboSigned->addItem("false");

    m_labelUnit = new QLabel(tr("Unit : "));
    m_lineUnit = new QLineEdit;

    m_HLayout = new QHBoxLayout;
    m_HLayout->addWidget(m_labelId);
    m_HLayout->addWidget(m_lineId);
    m_HLayout->addWidget(m_labelType);
    m_HLayout->addWidget(m_comboType);
    m_HLayout->addWidget(m_labelSize);
    m_HLayout->addWidget(m_spinSize);
    m_HLayout->addWidget(m_labelSigned);
    m_HLayout->addWidget(m_comboSigned);
    m_HLayout->addWidget(m_labelUnit);
    m_HLayout->addWidget(m_lineUnit);

    m_labelExplanation = new QLabel(tr("Explanation : "));
    m_textExplanation = new QTextEdit;
    m_textExplanation->setFixedSize(500, 50);

    m_HLayout2 = new QHBoxLayout;
    m_HLayout2->addWidget(m_labelExplanation);
    m_HLayout2->addWidget(m_textExplanation);

    m_VLayout = new QVBoxLayout;
    m_VLayout->addLayout(m_HLayout);
    m_VLayout->addLayout(m_HLayout2);
    parent->setLayout(m_VLayout);
}

void Data::addData(QWidget *parent)
{

}

